package xj.graph2d.tree;

import javax.swing.tree.DefaultMutableTreeNode;

public class GraphTreeNode 
  extends DefaultMutableTreeNode 
  implements xj.util.gui.TreeNodeToolTips {

  // node types
  public static final int GRAPH_NODE_SET = 0;

  public static final int GRAPH_EDGE_SET = 1;

  public GraphTreeNode(int nodetype) {
    this.nodetype = nodetype;
  }

  @Override
  public String toString() {
    if (nodetype == GRAPH_NODE_SET) {
      return "Nodes";
    } else if (nodetype == GRAPH_EDGE_SET) {
      return "Edges";
    } else {
      return null;
    }
  }

  public String getTip() {
    return toString();
  }

  protected int nodetype;

}
